package com.lhy.tool.patchplugin.model;

import com.lhy.tool.patchplugin.util.FileUtils;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.File;

/**
 * 抽象文件包装类
 */
@Getter
@Setter
@NoArgsConstructor
public abstract class FileWrapper {

    String fileType;

    File file;

    String absolutePath;

    public FileWrapper(File file) {
        this.file = file;
        this.fileType = FileUtils.getFileType(file.getName());
        this.absolutePath = file.getAbsolutePath().replaceAll("\\\\", "/");
    }
}
